<?php

namespace app\validator;

use think\Validate;

/**
 * RolePermission assign_permissions接口 验证器
 */
class RoleAssignPerms extends Validate
{
    protected $rule = [
        'role_id' => 'number|require',
        'perm_id' => 'array|require'
    ];

    protected $message = [
        'perm_id.require' => '权限id不能为空',
        'role_id.require' => '角色id不能为空',
        'role_id.number' => '角色id必须是数字',
        'perm_id.array' => '权限id必须是数组'
    ];
}